
import * as API from "../api";

export const paramType ={
    'big1':"/bigscreen/countUserNum", //用户总览
    'big2':"/bigscreen/countDeviceNum", //设备总览 
    'big3':"/bigscreen/sbtx", //设备提醒
    'big4':"/bigscreen/alarmNum", //报警次数
    'big5':'/bigscreen/ssyj',//实时预警 
    'big6':'/bigscreen/installationPlan',// 安装计划
    'big7':'/bigscreen/ranking',// 报警排名
    'big8':'/bigscreen/centermap',// //中间地图

}


 export const currentList =  (key,param)=> {
    return API.GET(paramType[key]+"/list", param)
}
export const currentPage =  (key,param)=> {
    return API.GET(paramType[key]+"/page", param)
}

 export const currentSelectList=  (key,param)=> {
    return API.GET(paramType[key]+"/selectList", param)
}



 export const currentSave= (key,param)=> {
    return API.POST(paramType[key]+"/save", param)
}

 export const currentUpdate=  (key,param) => {
    return API.POST(paramType[key]+"/update", param)
}


 export const currentDelete= (key,param) => {
    return API.POST(paramType[key]+"/delete", param)
}


 export const currentSelect=  (key,param)=> {
    return API.GET(paramType[key]+"/select", param)
}


 export const currentGET=  (key,param)=> {
    return API.GET(paramType[key], param)
}

 export const currentPOST=  (key,param)=> {
    return API.POST(paramType[key], param)
}
// 通用接口集合
export const currentApi={
    currentList,
    currentPage,
    currentSave,
    currentUpdate,
    currentDelete,
    currentSelect,
    currentSelectList,
    currentPOST,
    currentGET
}